package mfuny.ggongal.admin;

import mfuny.ggongal.admin.users.UserDao;
import mfuny.ggongal.admin.users.UserService;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class UserController {
	
	UserService user;
	
	public UserController() throws Exception {
		user = new UserService();
	}
	
	@RequestMapping("/userRegReport.ga")
	public ModelAndView userRegReport() throws Exception {
		return user.userRegReport( );
	}
	
	@RequestMapping("/userRegReport_all.ga")
	public ModelAndView userRegReport_all() throws Exception {
		return user.userRegReport_all( );
	}
	
	@RequestMapping("/userRegReport_month.ga")
	public ModelAndView userRegReport_month(int year, int month) throws Exception {
		return user.userRegReport_month( year, month );
	}
	
	@RequestMapping("/userRegReport_day.ga")
	public ModelAndView userRegReport_day(String day) throws Exception {
		return user.userRegReport_day( day );
	}
	
	@RequestMapping("/userSearch.ga")
	public ModelAndView userSearch() throws Exception {
		return user.userSearch( );
	}
	
	@RequestMapping("/userSearch_detail.ga")
	public ModelAndView userSearch_detail(String param ) throws Exception {
		return user.userSearch_detail( param );
	}
	
	@RequestMapping("/userSearch_detailPopup.ga")
	public ModelAndView userSearch_detailPopup(String id) throws Exception {
		return user.userSearch_detailPopup(id);
	}
	
	@RequestMapping("/userSearch_detailGgong.ga")
	public ModelAndView userSearch_detailGgong(String id, int page, int type) throws Exception {
		return user.userSearch_detailGgong(id, type, page);
	}
	
	@RequestMapping("/userSearch_modifyForm.ga")
	public ModelAndView userSearch_modifyForm(String id) throws Exception {
		return user.userSearch_modifyForm(id);
	}
	
	@RequestMapping("/userSearch_modify.ga")
	public ModelAndView userSearch_modify(@ModelAttribute UserDao userDao) throws Exception {
		return user.userSearch_modify(userDao);
	}
}
